import moment from 'moment'
export const vehicleFields = [{
  title: '标题',
  width: 240,
  dataIndex: 'title',
  fixed: 'left'
}, {
  title: '编号',
  dataIndex: 'bianhao',
  fixed: 'left'
}, {
  title: '车牌号',
  dataIndex: 'chepaihao'
}, {
  width: 120,
  title: '成交类型',
  dataIndex: 'chengjiaoLeixing',
  customRender: (text, row, index) => (text * 1) === 1 ? '商用车' : '乘用车'
}, {
  title: '车辆类型',
  dataIndex: 'cheliangleixing'
}, {
  title: '车系',
  dataIndex: 'chexi'
}, {
  title: '产权持有',
  dataIndex: 'chanquan'
}, {
  title: '初次登记',
  dataIndex: 'chucidengji'
}, {
  title: '户籍地',
  dataIndex: 'hujidi'
}, {
  title: '停放地',
  dataIndex: 'tingfangdi'
}, {
  title: '拍残值',
  dataIndex: 'caipaizhi',
  customRender: (text, row, index) => (text * 1) == 1 ? '是' : '否'
}, {
  title: '排放标准',
  dataIndex: 'paifang'
}, {
  title: '马力',
  dataIndex: 'mali'
}, {
  title: '发动机品牌',
  dataIndex: 'fadongjihao'
}, {
  title: '变速箱品牌',
  dataIndex: 'biansuxianghao'
}, {
  title: '钥匙数量',
  dataIndex: 'yaoshishu'
}, {
  title: '备胎',
  dataIndex: 'beitai'
}, {
  title: '登记证书',
  dataIndex: 'dengjizhengshu'
}, {
  title: '行驶证',
  dataIndex: 'xingshizheng'
}, {
  title: '营业执照',
  dataIndex: 'yinyezhizhao'
}, {
  title: '委托书',
  dataIndex: 'weituoshu'
}, {
  title: '是否抵押',
  dataIndex: 'shifoudiya',
  customRender: (text, row, index) => (text * 1) === 1 ? '是' : '否'
}, {
  title: '其他费用',
  dataIndex: 'qitafeiyong'
}, {
  title: '状态',
  dataIndex: 'status',
  customRender: (text, row, index) => (text * 1) == 1 ? '公开' : (text === 2 ? '竞价中' : '完成')
}, {
  title: '竞价状态',
  dataIndex: 'jingjiaStatus',
  customRender: (text, row, index) => (text * 1) == 1 ? '一次性' : '一口价'
}, {
  title: '一口价',
  dataIndex: 'yikoujia'
}, {
//   title: '指导价',
//   dataIndex: 'zhidaojia'
// }, {
  title: '保证金',
  dataIndex: 'baozhengjin'
}, {
  title: '底价',
  dataIndex: 'dijia'
}, {
  title: '最低加价',
  dataIndex: 'jiajia'
}, {
  title: '竞拍开始时间',
  dataIndex: 'start',
  customRender: (text, row, index) => {
    let time = moment(text).format('YYYY-MM-DD HH:mm:ss')
    return time === 'Invalid date' ? '' : time
  }
}, {
  title: '竞拍结束时间',
  dataIndex: 'end',
  customRender: (text, row, index) => {
    let time = moment(text).format('YYYY-MM-DD HH:mm:ss')
    return time === 'Invalid date' ? '' : time
  }
}, {
  title: '操作',
  dataIndex: 'operation',
  scopedSlots: { customRender: 'operation' },
  fixed: 'right',
  width: 100
}]
